import Vue from "vue";
import Router from "vue-router";
import Login from "@/views/login";
import Index from "@/components/common/Home";
import Home from "@/views/home"
import Table from "@/views/table"
import Sysuser from "@/views/system/sysuser"
import Dept from "@/views/system/dept"
import Role from "@/views/system/role"
import Sysmenu from "@/views/system/sysmenu"
import StaffInfo from "@/views/hr/staffInfo"

Vue.use(Router);

export default new Router({
  //mode: "history",
  base: process.env.BASE_URL,
  routes: [
		{
		  path: "/login",
		  name: "登录",//路由名称
		  component: Login
		},
    {
      path: '/',
      redirect: '/home'
    },
    {
      // 基础布局
      path: '/',
      name: '布局页',
      component: Index,
      children:[
        {
          path:'/home',
          component:Home,
          meta: { title: '系统管理' }
        },
				{
				  path:'/table',
				  component:Table,
				  meta: { title: '表格' }
				},
				{
				  path:'/sysuser',
				  component:Sysuser,
				  meta: { title: '用户管理' }
				},
				{
				  path:'/dept',
				  component:Dept,
				  meta: { title: '部门管理' }
				},
				{
				  path:'/role',
				  component:Role,
				  meta: { title: '角色管理' }
				},
				{
				  path:'/sysmenu',
				  component:Sysmenu,
				  meta: { title: '菜单管理' }
				},
				{
					path:'/staffInfo',
					component:StaffInfo,
					meta: { title: '人员信息' }
				}
				
        
      ]
      },
  ]
});
